package com.demo.oauth2jFinalShiroClient.oAuth2;

public class ThirdPartUser {

	private String username;
	private String channel;

	public ThirdPartUser(String username, String channel) {
		this.username = username;
		this.channel = channel;
	}

	public String getUsername() {
		return username;
	}

	public String getChannel() {
		return channel;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((channel == null) ? 0 : channel.hashCode());
		result = prime * result + ((username == null) ? 0 : username.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ThirdPartUser other = (ThirdPartUser) obj;
		if (channel == null) {
			if (other.channel != null)
				return false;
		} else if (!channel.equals(other.channel))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		return true;
	}

}
